import instance from "./request.js"
const apiService = {};

//登录
apiService.pushCode = (params) => {
	return instance({
		url: "v1/auth_login",
		method: 'post',
		params
	})
}

//首页热门
apiService.getHomeInfo = (params) => {
	return instance({
		url: "v1/home",
		method: 'get',
		params
	})
}

//首页列表
apiService.getIndexlist = (params) => {
	return instance({
		url: "v1/product",
		method: 'get',
		params
	})
}

//获取转链
apiService.getLink = (data) => {
	return instance({
		url: "v1/deep_link",
		method: 'POST',
		data
	})
}

//合集列表
apiService.getCollList = (data) => {
	return instance({
		url: "/v1/collection",
		method: 'GET',
		data
	})
}

//合集添加商品
apiService.addColl = (data) => {
	return instance({
		url: "/v1/collection_add",
		method: 'POST',
		data
	})
}

//获取合集分类
apiService.getCollType = (data) => {
	return instance({
		url: "/v1/collection_cate",
		method: 'GET',
		data
	})
}

//自定义合集
apiService.nameColl = (data) => {
	return instance({
		url: "/v1/collection_cate_add",
		method: 'POST',
		data
	})
}

//删除合集
apiService.deleteColl = (data) => {
	return instance({
		url: "/v1/collection_cate_delete",
		method: 'DELETE',
		data
	})
}

//获取账号信息
apiService.getUser = (data) => {
	return instance({
		url: "/v1/account",
		method: 'GET',
		data
	})
}

//用户预估收益
apiService.getIncome = (data) => {
	return instance({
		url: "/v1/user_income",
		method: 'GET',
		data
	})
}

//邀请用户
apiService.share = (data) => {
	return instance({
		url: "/v1/share",
		method: 'GET',
		data
	})
}

//直推用户列表
apiService.levelUser = (data) => {
	return instance({
		url: "/v1/level_user",
		method: 'GET',
		data
	})
}

//提现列表
apiService.share = (data) => {
	return instance({
		url: "/v1/share",
		method: 'GET',
		data
	})
}

//提现信息
apiService.withDrawal = (data) => {
	return instance({
		url: "/v1/withdrawal",
		method: 'GET',
		data
	})
}


//提现申请
apiService.goDrawal = (data) => {
	return instance({
		url: "/v1/withdrawal_apply",
		method: 'POST',
		data
	})
}


//推广订单列表
apiService.shareList = (data) => {
	return instance({
		url: "/v1/share_order",
		method: 'GET',
		data
	})
}

//提成订单列表
apiService.commissionList = (data) => {
	return instance({
		url: "/v1/commission_order",
		method: 'GET',
		data
	})
}

//合集分享链接
apiService.linkColl = (data) => {
	return instance({
		url: "/v1/collection_copy",
		method: 'GET',
		data
	})
}


//发送短信验证码
apiService.getCode = (data) => {
	return instance({
		url: "/v1/send_sms",
		method: 'POST',
		data
	})
}

//绑定手机号
apiService.bindPhone = (data) => {
	return instance({
		url: "/v1/bind_mobile",
		method: 'POST',
		data
	})
}

//
apiService.getNotice = (data) => {
	return instance({
		url: "/v1/pop_up",
		method: 'GET',
		data
	})
}

export default apiService;